<%-- 
    Document   : agregarImp
    Created on : 14/11/2010, 11:00:32 PM
    Author     : Patricia
--%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<% request.setAttribute("allowed", "Gestionar Implementos");%>
<%@ include file='../Templates/security.jsp' %>

<h1 class="title">Gestión de Implementos</h1>
<hr>
<p class="meta"></p>
<div class="entry">
    <center>
        <h2>Agregar Implemento</h2>
        <br>
        <html:form action="/agregarImplemento" styleId="agregarImplementoForm" onsubmit="return agregarImplemento();">
            <table>
                <tbody>
                    <html:errors property = "imp_fallido"/>
                    <tr>
                        <td><font color="red">*&nbsp;</font>Tipo:</td>
                        <td>
                            <select id="Tipo" name="nombre" onchange="listaSubtipoImplemento(value)">
                                <option value="" selected/>
                            </select>
                            <html:errors property = "tipo_imp_requerido"/>
                        </td>
                    </tr>
                    <tr>
                        <td><font color="red">*&nbsp;</font>Subtipo:</td>
                        <td>
                            <select id="Subtipo" name="subtipo">
                                <option value="" selected/>
                            </select>
                            <html:errors property = "subtipo_imp_requerido"/>
                        </td>
                    </tr>
                    <tr>
                        <td><font color="red">*&nbsp;</font>Marca:</td>
                        <td>
                            <html:text property="marca" size="40" />
                            <html:errors property = "marca_imp_requerido"/>
                        </td>
                    </tr>
                    <tr>
                        <td><font color="red">*&nbsp;</font>Estado:</td>
                        <td>
                            <html:text property="status" size="40" />
                            <html:errors property = "estado_imp_requerido"/>
                        </td>
                    </tr>
                    <tr>
                        <td><font color="red">*&nbsp;</font>Duración estimada:</td>
                        <td>
                            <html:text property="duracionEstimada" size="40" />
                            <html:errors property = "durEst_imp_requerido"/>
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;&nbsp;Duración real:</td>
                        <td><html:text property="duracionReal" size="40" /></td>
                    </tr>
                    <tr>
                        <td><font color="red">*&nbsp;</font>Calificación:</td>
                        <td>
                            <html:select property="calificacion">
                                <html:option value="-1">&nbsp;</html:option>
                                <html:option value="0">&nbsp;Sin Calificación</html:option>
                                <html:option value="5">&nbsp;Excelente</html:option>
                                <html:option value="4">&nbsp;Muy Bueno</html:option>
                                <html:option value="3">&nbsp;Bueno</html:option>
                                <html:option value="2">&nbsp;Regular</html:option>
                                <html:option value="1">&nbsp;Deficiente</html:option>
                            </html:select>
                            <html:errors property = "calificacion_imp_requerido"/>
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;&nbsp;Frecuencia de Uso:</td>
                        <td><html:text property="frecuenciaDeUso" size="40" /></td>
                    </tr>
                    <tr>
                        <td>&nbsp;&nbsp;Características adicionales:</td>
                        <td><html:textarea property="caracteristicasAdicionales" cols="30" rows="4"/></td>
                    </tr>
                </tbody>
            </table>
            <br>
            <font color="red"><p>Los campos con * son obligatorios.</p></font>
            <br>

            <html:submit value="  Agregar Implemento  "/>
            <html:button property="" styleId="implemento" value="  Atrás  "/>
        </html:form>
    </center>
</div>
<div style="clear: both;">&nbsp;</div>
<script type="text/javascript">
    $(function(){
        listaTipoImplemento();
    });
</script>